﻿using Commands;
using Commands.Commands;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PluginSendToKindle
{
    public class CommandsList : CommandListBase
    {
        [RemoteCommand("Send files to kindle.", "sendtokindle", "stk", "kindle")]
        public bool SendToKindle(
            [Parameter("Mail to which result must be sent", typeof(string), false, "mail", "name", "kindle")] string kindleMail,
            [FolderWithSavedAttachesParameter] string folderWithSavedAttaches)
        {
            var sendToKindle = new SendToKindle(kindleMail, Mailer, SettingsHelper.Settings);
            sendToKindle.Send(folderWithSavedAttaches);
            return true;
        }
    }
}
